package cn.shadow;

import cn.shadow.pojo.User;
import cn.shadow.service.IUserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Main {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        ApplicationContext ac2 = new AnnotationConfigApplicationContext();
        IUserService userService = ac.getBean(IUserService.class);
        List<User> users = userService.getAll();
        System.out.println(users);
    }
}